﻿

namespace Hotel.Module.Resources
{
    using System;
    using System.Collections.Generic;
    using Hotel.Module.Resources.Models;

    public interface IResourseManagment : IDisposable
    {
        #region IResourseManagment members

        /// <summary>
        /// Save changes made in Repository
        /// </summary>
        void SaveChanges();

        #endregion
        #region For rooms
        /// <summary>
        /// Recives a full list of rooms
        /// </summary>
        List<Room> GetAllRooms();
        /// <summary>
        /// Recieves a list of free rooms
        /// </summary>
        List<Room> GetFreeRooms(DateTime indate, DateTime outdate, RoomType type);
        /// <summary>
        /// Release rooms if order cancelled
        /// </summary>
        /// <param name="ID">Order ID</param>
        void FreeRoomsByOrderID(int ID);
        #endregion
        #region For halls

        /// <summary>
        /// reciebes a list of all halls
        /// </summary>
        List<Hall> GetHalls();
        /// <summary>
        /// Recieves a list of free Halls
        /// </summary>
        List<Hall> GetFreeHalls(DateTime indate, DateTime outdate, HallType type);

        #endregion
        #region For Services
        /// <summary>
        /// Get total cost of provided services
        /// </summary>
        /// <param name="ServicesIDs">IDs of services</param>
        /// <returns>Total cost of provided services</returns>
        double GetServicesTotalCost(List<int> ServicesIDs);

        /// <summary>
        /// Get Service from Repository by ID
        /// </summary>
        /// <param name="ID">Service ID</param>
        /// <returns>Sought-for Service</returns>
        Service GetServiceByID(int ID);

        /// <summary>
        /// Get Service from Repository by Name
        /// </summary>
        /// <param name="ServiceName">Service Name</param>
        /// <returns>Sought-for Service</returns>
        Service GetServiceByName(string ServiceName);

        /// <summary>
        /// Get services due to its type(rated/unrated/all)
        /// </summary>
        /// <param name="ServiceType">Rated, Unrated, All by default</param>
        /// <returns>List of services</returns>
        List<Service> GetAllServices(ServiceType InitServiceType);

        /// <summary>
        /// Create new service
        /// </summary>
        /// <param name="ServiceName">Service Name</param>
        /// <param name="ServiceCost">Cost of Service</param>
        /// <param name="OrderID">ID of order for this service</param>
        void CreateService(string ServiceName, double ServiceCost, int OrderID, bool RatedService = false);

        /// <summary>
        /// Get number for new service
        /// </summary>
        /// <returns>New ordinal number</returns>
        int GetNewServiceNumber();

        #endregion
    }
}
